package com.wlr.blog.web.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 
 * @TableName page_info
 */
@TableName(value ="page_info")
@Data
public class PageInfo implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer id;

    /**
     * 页面名称
     */
    private String pageName;

    /**
     * 页面背景图片地址
     */
    private String pageCover;

    /**
     * 路由地址
     */
    private String pageRoute;

    /**
     * label
     */
    private String pageLabel;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PageInfo other = (PageInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPageName() == null ? other.getPageName() == null : this.getPageName().equals(other.getPageName()))
            && (this.getPageCover() == null ? other.getPageCover() == null : this.getPageCover().equals(other.getPageCover()))
            && (this.getPageRoute() == null ? other.getPageRoute() == null : this.getPageRoute().equals(other.getPageRoute()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPageName() == null) ? 0 : getPageName().hashCode());
        result = prime * result + ((getPageCover() == null) ? 0 : getPageCover().hashCode());
        result = prime * result + ((getPageRoute() == null) ? 0 : getPageRoute().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", pageName=").append(pageName);
        sb.append(", pageCover=").append(pageCover);
        sb.append(", pageRoute=").append(pageRoute);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}